%ѡ��(���̶ķ�ʽ)

function SelectChromes=Selection(Chrome,cutCost,N,Select_no,m_no,n_no)
    SelectChromes=zeros(Select_no,m_no+n_no);%ѡ��select_no��chrome
    Select_P=cutCost/sum(cutCost); %����ÿ�ֵ��ȷ�����ѡ��ĸ���
    for i=1:Select_no
        Temp=rand;
        Temp_sum=0;
        if Temp==0
            SelectChromes(i,:)=Chrome(1,:);
        else
            for j=1:N
                Temp_sum=Temp_sum+Select_P(j);
                if  Temp<=Temp_sum
                    SelectChromes(i,:)=Chrome(j,:);
                    break;
                end
            end
        end
    end
end